package com.iamback.dy.examine.service;

import com.iamback.dy.entity.User;
import com.iamback.dy.entity.UserAssign;
import com.iamback.dy.examine.common.Page;
import com.iamback.dy.examine.vo.UserAssignView;
 

/**
 * <p>
 * 用户服务类
 * </p> 
 */
public interface IUserService   {

	

	Page<User> findUserPage(String searchText, Integer pageNumber, Integer pageSize);
	/**
	 * 根据用户名查找用户
	 * @param username
	 * @return
	 */
	User findByUserName(String username);

	/**
	 * 增加或者修改用户
	 * @param user
	 */
	void saveOrUpdate(User user);

	/**
	 * 给用户分配角色
	 * @param id 用户ID
	 * @param roleIds 角色Ids
	 */
	void grant(Integer id, String[] roleIds);

	void delete(Integer id);

	User findUserById(Integer userId);

	Page<UserAssignView> getUserAssignPage(Integer pageNum, Integer numPerPage);

	void updateUserAssign(UserAssign userAssign);


}
